package com.security.mapper;

import com.security.domain.po.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 角色表映射器
 * persistence object mapper
 * 持久化对象映射器
 *
 * @author DblSun
 */
@Mapper
public interface RoleMapper {
    @Select("select * from role r " +
            "left join account_role ar on r.id = ar.rid " +
            "left join account a on a.id = ar.aid ")
    List<Role> getRoleById(int aid);
}
